<% @page_title = "换头像 | 多背一公斤" %>

<h1>换头像</h1>
<% form_for :user, :url => update_avatar_user_url(@user.id), :html => {:method => 'put', :multipart => true} do |f| -%>
  <table border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td><label for="user_avatar">现在的</label></td>
      <td><%= avatar_for @user, 'large' %></td>
    </tr>
    <tr>
      <td valign="top"><label for="user_change_avatar">换头像</label></td>
      <td><%= file_column_field 'user', 'avatar_url' %><br />
        <span class="tip">你的头像尺寸要大于 72x72 像素</span></td>
    </tr>
  </table>
  <p><%= submit_tag "更新" %></p>
<% end -%>